*****************************************
* Replication data 
* Title:   Supplying Influence
* Authors: Betz, Timm and Leonhard Hummel 
* Date:    April 17, 2025 
* Journal: International Organization


* set global folders
clear all 
global ADdata ~/Box/ADNetworks/data/IOreplication 
global ADtext ~/Box/ADNetworks/text/IOfinal  

cd ${ADdata}

* packages that might need to be installed 
	ssc install schemepack
	net install tf, force from(http://www.princeton.edu/~davidlee/wp/)
	ssc install ivreg2 
	ssc install ranktest 
	ssc install spmap 
	ssc install heatplot 
	ssc install palettes 
	ssc install colrspace 
	ssc install estout
	

* load data and create global macros 
use replication_main.dta, replace 

	global controls 	"steelDummy lnOutput imp_perc_change nme DIME ye ye2 ye3 presElection" 
	global controls2 	"MNC listed rerWeight lnFixed steelDummy lnOutput imp_perc_change nme DIME ye ye2 ye3 presElection" 

	global varlabels etaY "$\eta$" etaT "$\eta^{T}$" etaM "$\eta^{M}$" //// 
		steelDummy "Steel Products" lnOutput "Industry Output (log)" ///
		imp_perc_change "Percentage Change Imports" /// 
		DIME "Campaign Contributions" /// 
		nme "Non-Market Economy" /// 
		rerWeight "Real Exchange Rate" listed "Stock-listed" lnFixed "Fixed Assets" ///
		presElection "Presidential Election"  _cons "Constant" 


* RESULTS IN MAIN BODY 

	* Table 1 | Success of AD Petitions | Base Models 
	logit injDecision etaY 		$controls, robust nolog cluster(CASE_ID)
	estimates store m1 
	logit injDecision etaY 		$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m2 
	logit injDecision etaT 		$controls, robust nolog cluster(CASE_ID)
	estimates store m3 
	logit injDecision etaT 		$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m4 
	logit injDecision etaM 		$controls, robust nolog cluster(CASE_ID)
	estimates store m5 
	logit injDecision etaM 		$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM ) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
		varlabels($varlabels) 


	* Table 2 | Success of AD Petitions | Fixed Effects and 2SLS 
	areg injDecision etaY 		$controls, robust abs(FIRM_ID) cluster(CASE_ID)
	estimates store m1 
	areg injDecision etaY 		$controls2 i.naics_3d, robust abs(FIRM_ID) cluster(CASE_ID)
	estimates store m2
	areg injDecision etaT 		$controls, robust abs(FIRM_ID) cluster(CASE_ID)
	estimates store m3
	areg injDecision etaT 		$controls2 i.naics_3d, robust abs(FIRM_ID) cluster(CASE_ID)
	estimate store m4
	areg injDecision etaM 	 	$controls, robust abs(FIRM_ID) cluster(CASE_ID)
	estimates store m5 
	areg injDecision etaM 		$controls2 i.naics_3d, robust abs(FIRM_ID) cluster(CASE_ID)
	estimates store m6 
	ivregress 2sls injDecision    (etaM = supplierRER) $controls, robust cluster(CASE_ID)
	estimates store m7 
	ivregress 2sls injDecision    (etaM = supplierRER) $controls2 i.naics_3d, robust cluster(CASE_ID)
	estimates store m8

	estout m1 m2 m3 m4 m5 m6 m7 m8, extracols(3 5 7) nolz style(tex) /// 
		order(etaY etaT etaM ) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels)

            * adjusted 95% interval (Lee et al. 2022)
            * printed in the bottom of the table 
            capture drop sample1 sample2 
            ivregress 2sls injDecision  (etaM = supplierRER) $controls, robust cluster(CASE_ID)
            gen sample1 = e(sample)
            ivregress 2sls injDecision (etaM = supplierRER) $controls2 i.naics_3d, robust cluster(CASE_ID)
            gen sample2 = e(sample) 

            tf injDecision (etaM = supplierRER)  $controls if sample1 == 1, robust cluster(CASE_ID) 
            local lower = e(tF_LB_05) 
            local upper = e(tF_UB_05)
            di "adj. 95% interval: " "["round(`lower', .01) " , " round(`upper', .01) "]" 
            tf injDecision (etaM = supplierRER)  $controls2 i.naics_3d if sample2 == 1, robust cluster(CASE_ID) 
            local lower = e(tF_LB_05) 
            local upper = e(tF_UB_05)
            di "adj. 95% interval: " "["round(`lower', .01) " , " round(`upper', .01) "]" 
            capture drop sample1 sample2 


* FIGURES IN MAIN BODY 
	
	* Figure 2 | Distribution of Occupations 
	use replication_Fig2.dta, replace 

	heatplot rankInv industry i.occGroup,  color(tol iridescent) cuts(-.1(.1)1) legend(off) ///
		xlabel("") xtick(.5(1)99.5, grid) ///
        xtitle("Occupation", placement(east)) ///
        ytitle("") ///
		ylabel(1 "Fabric mills" 2 "Millwork" 3 "Urethane foams" ///
			4 "Springs and wires" 5 "Mattresses", nogrid) ///
        title("{bf:Distribution of Occupations: Mattress Manufacturing and Key Suppliers}", ///
			span placement(west)) ///
            xsize(8) ysize(3)

	graph export ${ADtext}/Figure2_occMatrix.pdf, as(pdf) name("Graph") replace 

	
	* Figure 3 | AD Petitions across U.S. Counties 
	use replication_Fig3.dta, replace 

		capture drop triple 
		gen triple = anyAD 
		replace triple = 2 if anyAD == 1 & anyADsupplier == 1
		replace triple = 3 if anyAD == 0 & anyADsupplier == 1
      
		label define labTr 0 "none" 1 "AD Dispute" 2 "incl. Suppliers" 3 "only Suppliers"
		label values triple labTr

      spmap triple using ushistcoord if STATE_TERR != "Hawaii" & STATE_TERR != "Alaska", ///
		id(id) clmethod(unique) fcolor(white khaki olive ebblue ) ///
		ocolor(gs13  khaki olive ebblue) ///
		title("     {bf:AD Petitions across U.S. Counties}", placement(w)) ///
		subtitle("Counties with at least 250 employees in industries represented in AD petitions filed in 2015", placement(w))

      graph export ${ADtext}/Figure3_mapCounties.pdf, as(pdf) name("Graph")
	

	* Figure 4 | Success Rate and Number 
	use replication_Fig4.dta, replace 

	twoway bar injNE year, fcolor("251 162 127") lcolor(gs8) /// 
		|| bar injE year, fcolor("255 86 29") lcolor(gs8) /// 
		scheme(white_tableau) yscale(r(0 1.01)) /// 
		ylabel(0(.2)1,labsize(medium) grid angle(0)) ///
		ylabel(0(20)100,labsize(medium) grid angle(0) axis(2)) ///
		|| line AD year, yaxis(2) lcolor(edkblue) lwidth(thick) ytitle("Number  " "AD cases", axis(2) orientation(horizontal) placement(n)) ///
		title("{bf:Success Rate and Number of Anti-Dumping Petitions}", placement(w) span) ///
		subtitle("  1992-2019, U.S. Data, all petitions", placement(w) span) ///
	     legend(off) 

	graph export ${ADtext}/Figure4_successNumber.pdf, as(pdf) name("Graph") replace


	* Figure 5 | Distribution of $\eta$ across Industries 
	use replication_Fig5and6.dta, replace 
	
      graph bar (mean) eta11-eta33 if year == 2012, ///
            over(naics12, label(nolab)) ///
            over(naics3d, label(labsize(medium) angle(90) labgap(0))) ///
            title("{bf:Distribution of {&eta} across Industries}", span placement(w)) ///
			bargap(4) ///
            subtitle("Data for 2012, NAICS 6-digit industry codes", span placement(w)) ///
            ylabel(,labsize(medium)) /// 
            nofill scheme(white_tableau) vertical legend(off) ///
            bar(1, lwidth(none) ) bar(2, lwidth(none)) bar(3, lwidth(none)) /// 
            bar(4, lwidth(none)) bar(5, lwidth(none))  ///
            xsize(10) ysize(4)

			graph export ${ADtext}/Figure5a_eta.pdf, as(pdf) name("Graph") replace 
      
      graph bar (mean) etaT11-etaT33 if year == 2012, ///
            over(naics12, label(nolab)) ///
            over(naics3d, label(labsize(medium) angle(90) labgap(0))) ///
            title(" {bf:Distribution of {&eta}{sup:T} across Industries}", span placement(w)) ///
			bargap(0) ///
            subtitle("Data for 2012, NAICS 6-digit industry codes", span placement(w)) ///
            ylabel(,labsize(medium)) /// 
            nofill scheme(white_tableau) vertical legend(off) ///
            bar(1, lwidth(none)) bar(2, lwidth(none)) bar(3, lwidth(none)) /// 
            bar(4, lwidth(none)) bar(5, lwidth(none))  ///
            xsize(10) ysize(4)

            graph export ${ADtext}/Figure5b_etaT.pdf, as(pdf) name("Graph") replace 

      graph bar (mean) etaM11-etaM33 if year == 2012, ///
            over(naics12, label(nolab)) ///
            over(naics3d, label(labsize(medium) angle(90) labgap(0))) ///
            title(" {bf:Distribution of {&eta}{sup:M} across Industries}", span placement(w)) ///
			bargap(0) ///
            subtitle("Data for 2012, NAICS 6-digit industry codes", span placement(w)) ///
            ylabel(,labsize(medium)) /// 
            nofill scheme(white_tableau) vertical legend(off) ///
            bar(1, lwidth(none)) bar(2, lwidth(none)) bar(3, lwidth(none)) /// 
            bar(4, lwidth(none)) bar(5, lwidth(none)) ///
            xsize(10) ysize(4)

            graph export ${ADtext}/Figure5c_etaM.pdf, as(pdf) name("Graph") replace 
			
			
	  * Figure 6 | $\eta^M$ over time 
	  use replication_Fig5and6.dta, replace 

      capture drop compList 
      gen compList = . 
      foreach num of numlist 336111 336112 321113 331110 {
            replace compList = 1 if naics12 == `num'
      }

      xtline etaM if compList == 1, overlay scheme(white_tableau)   /// 
            title("{bf:{&eta}{sup:M} over time, for select industries}", span placement(w)) ///
            plot1(lwidth(thick)) plot2(lwidth(thick)) ///
            plot3(lwidth(thick)) plot4(lwidth(thick)) ///
            xtitle("") ytitle("") ///
            xlabel(,labsize(medium)) /// 
            ylabel(,labsize(medium)) /// 
            legend(ring(0) position(1) label(1 "Saw Mills") label(2 "Iron & Steel Mills") label(3 "Automobiles") label(4 "Light Trucks"))

            graph export ${ADtext}/Figure6_etaM.pdf, as(pdf) name("Graph") replace 
			
			

* RESULTS IN APPENDIX 
   
      ** APPENDIX B: Case Merits 
      use replication_appB.dta, replace 
           
            areg etaY challenged lnOutput, robust abs(country)
            margins, at(challenged = (0,1))

            areg etaT challenged lnOutput, robust abs(country)
            margins, at(challenged = (0,1))

            areg etaM challenged lnOutput, robust abs(country)
            margins, at(challenged = (0,1))

            areg etaY win lnOutput, robust abs(country)
            margins, at(win = (0,1))

            areg etaT win lnOutput, robust abs(country)
            margins, at(win = (0,1))

            areg etaM win lnOutput, robust abs(country)
            margins, at(win = (0,1))


      ** APPENDIX C: Mediation Analysis 
      use replication_main.dta, replace 

      foreach var of varlist lnEmpIndirect lnEmpDirect {
            foreach iVar of varlist etaY etaT etaM { 
                  local mediator `var'
                  qui {
                  logit injDecision `iVar'  $controls2 i.naics_3d    if `mediator' != ., robust nolog cluster(CASE_ID) 
                        scalar beta_z = _b[`iVar']
                  reg  `mediator' `iVar' $controls2 i.naics_3d, robust cluster(CASE_ID)
                        scalar var_e = e(rmse)^2
                        *scalar alpha_z = _b[`iVar']
                  logit injDecision  `iVar'  `mediator' $controls2 i.naics_3d, robust cluster(CASE_ID)
                        estimates store m`i'
                        scalar gamma_z = _b[`iVar']
                        scalar gamma_m = _b[`mediator']
                        scalar adjust = sqrt(1 + (gamma_m)^2*var_e*3/(c(pi)^2))
                        local total_`mediator'_`iVar' = round(beta_z, .001) 
                        local direct_`mediator'_`iVar' = round(gamma_z/adjust, .001)
                        local prop_`mediator'_`iVar' = round(100*(1 - gamma_z/(adjust*beta_z)), .1)
                  }
            
                  di "**************************"
                  di "* MEDIATOR: `mediator' * "
                  di "**************************"
                  di "Variable:  " "`iVar'"
                  di "total effect: " beta_z  
                  di "direct effect: "  gamma_z/adjust
                  di "proportion mediated (diff): " round(100*(1 - gamma_z/(adjust*beta_z)),.01) "%"
                  di "*******************"
            }
      }

            * create table latex 
            di "              &           total effect       &          direct effect       &        prop. mediated indirect &       prop. mediated direct   "
            di "  $\eta$      &   `total_lnEmpIndirect_etaY' &  `direct_lnEmpIndirect_etaY' &  `prop_lnEmpIndirect_etaY'\%   &  `prop_lnEmpDirect_etaY'\% \\ "
            di "  $\eta^T$    &   `total_lnEmpIndirect_etaT' &  `direct_lnEmpIndirect_etaT' &  `prop_lnEmpIndirect_etaT'\%   &  `prop_lnEmpDirect_etaT'\% \\ "
            di "  $\eta^M$    &   `total_lnEmpIndirect_etaM' &  `direct_lnEmpIndirect_etaM' &  `prop_lnEmpIndirect_etaM'\%   &  `prop_lnEmpDirect_etaM'\% \\ "

	reg lnEmpIndirect etaY $controls2 i.naics_3d, robust cluster(CASE_ID) 
	estimates store m1
	reg lnEmpIndirect etaT $controls2 i.naics_3d, robust cluster(CASE_ID) 
	estimates store m2
	reg lnEmpIndirect etaM $controls2 i.naics_3d, robust cluster(CASE_ID) 
	estimates store m3 

	estout m1 m2 m3, ///
	order(etaY etaT etaM) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
		nolz style(tex) /// 
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels lnImports "Import volume (log)")


      ** APPENDIX D: Sensitivity Analysis 
      use replication_main.dta, replace 

            ssc install sensemakr 

      sensemakr  injDecision  etaY $controls  , treat(etaY) benchmark(imp_perc_change)  ky(1 5 10) kd(1 1 1)
      sensemakr  injDecision  etaT $controls  , treat(etaT) benchmark(imp_perc_change)  ky(1 5 10) kd(1 1 1)
      sensemakr  injDecision  etaM $controls  , treat(etaM) benchmark(imp_perc_change)  ky(1 5 10) kd(1 1 1)

      sensemakr  injDecision  etaY $controls rerWeight  , treat(etaY) benchmark(rerWeight)  ky(1 5 10) kd(1 1 1)
      sensemakr  injDecision  etaT $controls rerWeight  , treat(etaT) benchmark(rerWeight)  ky(1 5 10) kd(1 1 1)
      sensemakr  injDecision  etaM $controls rerWeight  , treat(etaM) benchmark(rerWeight)  ky(1 5 10) kd(1 1 1)


      ** APPENDIX E: Withdrawn Cases
	  use replication_appE.dta, replace 

            capture drop bUpper bLower tUpper tLower 
            gen bUpper = . 
            gen tUpper = .
            gen bLower = .
            gen tLower = . 

            local e = 0 
            forvalues s = 0.05(.05).95 {
                  local e = `e' + 1
                  qui su b_eta_`e'
                  replace bUpper = r(max) if _n == `e'
                  replace bLower = r(min) if _n == `e'
                  qui su t_eta_`e'
                  replace tUpper = r(max) if _n == `e'
                  replace tLower = r(min) if _n == `e'
            } 

            replace sProb = . if sProb == 0 

            gen prop = prop1 

            gen prop0 = prop1 if prop1 == 0 
            replace prop1 = . if prop1 == 0 

            capture drop prop1N 
            gen prop1N = 5000*prop1 

	twoway rcap tUpper tLower sProb, yaxis(1) yline(1.96) ///
		|| scatter prop0 sProb , yaxis(2) ///
		|| scatter prop1 sProb , yaxis(2) mlabel(prop1N) ///
		scheme(white_tableau) legend(off) ///
		yscale(r(0 8)) ylabel(0(2)8, nogrid) ///
		yscale(r(0 .05) axis(2)) ylabel(0(.01).05, axis(2) nogrid) ///
		xscale(r(0 1)) xlabel(0(.1)1, nogrid) ///
		title("{bf:Incorporating withdrawn and terminated cases}", span placemen(w)) ///
		subtitle("t-statistics and proportion insignificant results across 5000 permuations", span placement(w)) ///
		xtitle("Proportion of successful petitions", placement(e)) ///
		ytitle("Range" "t-stats", axis(1) orientation(horizontal) placement(nw)) ///
		ytitle("prop.    "  "t < 1.96", orientation(horizontal) placement(ne) axis(2))

	graph export ${ADtext}/appPermuteT.pdf, as(pdf) name("Graph") replace 
	
            qui logit injDecision etaM $controls, robust nolog cluster(naics)
            local beta_hat = _b[etaM]

	twoway rcap bUpper bLower sProb, yaxis(1) yline(`beta_hat') ///
		|| scatter prop0 sProb , yaxis(2) ///
		|| scatter prop1 sProb , yaxis(2) mlabel(prop1N) ///
		scheme(white_tableau) legend(off) ///
		yscale(r(0 3)) ylabel(0(.5)3, nogrid) ///
		yscale(r(0 .05) axis(2)) ylabel(0(.01).05, axis(2) nogrid) ///
		xscale(r(0 1)) xlabel(0(.1)1, nogrid) ///
		title("{bf:Incorporating withdrawn and terminated cases}", span placemen(w)) ///
		subtitle("{&beta} estimates and proportion insignificant results across 5000 permuations", span placement(w)) ///
		xtitle("Proportion of successful petitions", placement(e)) ///
		ytitle("Range" "{&beta}", axis(1) orientation(horizontal) placement(nw)) ///
		ytitle("prop.    "  "t < 1.96", orientation(horizontal) placement(ne) axis(2))

	graph export ${ADtext}/appPermuteB.pdf, as(pdf) name("Graph") replace 


     ** APPENDIX F: Import allocation across industries 
     use replication_appF.dta, replace 
            capture drop prop100
            capture drop bUpper bLower tUpper tLower 
            gen bUpper = . 
            gen tUpper = .
            gen bLower = .
            gen tLower = . 

            capture drop sProb 
            gen sProb =  (_n)*.025 if _n < 40

            forvalues e = 1/39 {
                  qui su b_eta_`e'
                  replace bUpper = r(max) if _n == `e'
                  replace bLower = r(min) if _n == `e'
                  qui su t_eta_`e'
                  replace tUpper = r(max) if _n == `e'
                  replace tLower = r(min) if _n == `e'
            } 

	twoway rcap bUpper bLower sProb, yaxis(1) ///
		|| rcap tUpper tLower sProb , yaxis(2) ///
		scheme(white_tableau) legend(off) ///
		yscale(r(1.5 4)) ylabel(1.5(.5)4, nogrid) ///
		yscale(r(1 6) axis(2)) ylabel(1(.5)6, axis(2) nogrid) ///
		xscale(r(0 1)) xlabel(0(.1)1, nogrid) ///
		title(" {bf:Perturbing Import Shares}", span placement(w)) ///
		subtitle("Coefficient estimates and t-statistics: 1000 perturbations for each value of {it:t}", span placement(w)) ///
		xtitle("Bounds of perturbations ({it:t})", placement(e)) ///
		ytitle("Range Coefficients", axis(1) orientation(vertical) placement(nw)) ///
		text(3.95 .1 "t-statistics", color(dkorange)) text(1.8 .15 "Coefficients", color(edkblue)) /// 
		ytitle("Range t-statistics", orientation(vertical) placement(ne) axis(2))

	graph export ${ADtext}/appImports.pdf, as(pdf) name("Graph") replace 


    * Table G1 | Alternative Predictors 
	logit injDecision eta2012 		$controls, robust nolog cluster(CASE_ID)
	estimates store m1 
	logit injDecision eta2012 		$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m2 
	logit injDecision etaM_nonrelated 	$controls, robust nolog cluster(CASE_ID)
	estimates store m3
	logit injDecision etaM_nonrelated 	$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m4
	logit injDecision lnZetaM		$controls, robust nolog cluster(CASE_ID)
	estimates store m5
	logit injDecision lnZetaM		$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5)  nolz style(tex) /// 
		order(eta2012 etaM_nonrelated lnZetaM) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels(eta2012 "$\eta^{2012}$" //// 
		lnZetaM "total domestic Inputs (log)" ///
		etaM_nonrelated "$\eta^{F}$" $varlabels) 


	* Table G2 | Clustered by firm
	logit injDecision etaY 		$controls, robust nolog cluster(FIRM_ID)
	estimates store m1 
	logit injDecision etaY 		$controls2 i.naics_3d, robust nolog cluster(FIRM_ID)
	estimates store m2 
	logit injDecision etaT 		$controls, robust nolog cluster(FIRM_ID)
	estimates store m3 
	logit injDecision etaT 		$controls2 i.naics_3d, robust nolog cluster(FIRM_ID)
	estimates store m4 
	logit injDecision etaM 		$controls, robust nolog cluster(FIRM_ID)
	estimates store m5 
	logit injDecision etaM 		$controls2 i.naics_3d, robust nolog cluster(FIRM_ID)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM ) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels)


	* Table G3 | Clustered by industry  
	logit injDecision etaY 		$controls, robust nolog cluster(naics)
	estimates store m1 
	logit injDecision etaY 		$controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m2 
	logit injDecision etaT 		$controls, robust nolog cluster(naics)
	estimates store m3 
	logit injDecision etaT 		$controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m4 
	logit injDecision etaM 		$controls, robust nolog cluster(naics)
	estimates store m5 
	logit injDecision etaM 		$controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM ) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels)


	* Table G4 | Clustered by petition and industry  
	ssc install vcemway 
	vcemway logit injDecision etaY 		$controls, robust nolog cluster(naics CASE_ID)
	estimates store m1 
	vcemway logit injDecision etaY 		$controls2 i.naics_3d, robust nolog cluster(naics CASE_ID)
	estimates store m2 
	vcemway logit injDecision etaT 		$controls, robust nolog cluster(naics CASE_ID)
	estimates store m3 
	vcemway logit injDecision etaT 		$controls2 i.naics_3d, robust nolog cluster(naics CASE_ID)
	estimates store m4 
	vcemway logit injDecision etaM 		$controls, robust nolog cluster(naics CASE_ID)
	estimates store m5 
	vcemway logit injDecision etaM 		$controls2 i.naics_3d, robust nolog cluster(naics CASE_ID)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM ) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels)
		

	* Table G5 | Weighted logit 
	logit injDecision etaY 		$controls [pweight=nProd], robust nolog cluster(CASE_ID)
	estimates store m1 
	logit injDecision etaY 		$controls2 i.naics_3d [pweight=nProd], robust nolog cluster(CASE_ID)
	estimates store m2 
	logit injDecision etaT 		$controls [pweight=nProd], robust nolog cluster(CASE_ID)
	estimates store m3 
	logit injDecision etaT 		$controls2 i.naics_3d [pweight=nProd], robust nolog cluster(CASE_ID)
	estimates store m4 
	logit injDecision etaM 		$controls [pweight=nProd], robust nolog cluster(CASE_ID)
	estimates store m5 
	logit injDecision etaM 		$controls2 i.naics_3d [pweight=nProd], robust nolog cluster(CASE_ID)
	estimates store m6 


	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM ) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels)


	* Table G6 | Collapse data by petition, weighted average  
	preserve 
		collapse (mean) injDecision etaY etaT etaM MNC listed anyPol anyDIME DIME anyDIMET nme rerWeight lnFixed steelDummy lnOutput imp_perc_change ye ye2 ye3 presElection  [iweight=empWeight], by(CASE_ID)

		logit injDecision etaY 		$controls, robust nolog cluster(CASE_ID)
		estimates store m1 
		logit injDecision etaY 		$controls2 , robust nolog cluster(CASE_ID)
		estimates store m2 
		logit injDecision etaT 		$controls, robust nolog cluster(CASE_ID)
		estimates store m3 
		logit injDecision etaT 		$controls2, robust nolog cluster(CASE_ID)
		estimates store m4 
		logit injDecision etaM 		$controls, robust nolog cluster(CASE_ID)
		estimates store m5 
		logit injDecision etaM 		$controls2, robust nolog cluster(CASE_ID)
		estimates store m6 

		estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
			order(etaY etaT etaM ) ///
			drop(ye ye2 ye3 ) ///
			cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
			stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
			varlabels($varlabels)

	restore 


	* Table G7 | Collapse data by petition, simple average   
	preserve 
	
		collapse (mean) injDecision etaY etaT etaM MNC listed anyPol DIME anyDIME anyDIMET nme rerWeight lnFixed steelDummy lnOutput imp_perc_change ye ye2 ye3 presElection, by(CASE_ID)

		logit injDecision etaY 		$controls, robust nolog cluster(CASE_ID)
		estimates store m1 
		logit injDecision etaY 		$controls2, robust nolog cluster(CASE_ID)
		estimates store m2 
		logit injDecision etaT 		$controls, robust nolog cluster(CASE_ID)
		estimates store m3 
		logit injDecision etaT 		$controls2, robust nolog cluster(CASE_ID)
		estimates store m4 
		logit injDecision etaM 		$controls, robust nolog cluster(CASE_ID)
		estimates store m5 
		logit injDecision etaM 		$controls2, robust nolog cluster(CASE_ID)
		estimates store m6 

		estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
			order(etaY etaT etaM ) ///
			drop(ye ye2 ye3 ) ///
			cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
			stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
			varlabels($varlabels)
	restore 


	* Table G8 | Year FE 
	logit injDecision etaY 		$controls i.year, robust nolog cluster(CASE_ID) 
	estimates store m1 
	logit injDecision etaY 		$controls2 i.naics_3d i.year, robust nolog cluster(CASE_ID)  
	estimates store m2 
	logit injDecision etaT 		$controls i.year, robust nolog cluster(CASE_ID) 
	estimates store m3 
	logit injDecision etaT 		$controls2 i.naics_3d i.year, robust nolog cluster(CASE_ID)  
	estimates store m4 
	logit injDecision etaM 		$controls i.year, robust nolog cluster(CASE_ID)  
	estimates store m5 
	logit injDecision etaM 		$controls2 i.naics_3d i.year, robust nolog cluster(CASE_ID) 
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM ) ///
	 	drop(ye ye2 ye3 *naics_* presElection *year ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels)


	* Table G9 | Linear Probability Model 
	reg injDecision etaY 		$controls, robust cluster(CASE_ID)
	estimates store m1 
	reg injDecision etaY 		$controls2 i.naics_3d, robust cluster(CASE_ID)
	estimates store m2 
	reg injDecision etaT 		$controls, robust cluster(CASE_ID)
	estimates store m3 
	reg injDecision etaT 		$controls2 i.naics_3d, robust cluster(CASE_ID)
	estimates store m4 
	reg injDecision etaM 		$controls, robust cluster(CASE_ID)
	estimates store m5 
	reg injDecision etaM 		$controls2 i.naics_3d, robust cluster(CASE_ID)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM ) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels)

		

	* Table G10 | Imports of Inputs and Upstreamness 
	logit injDecision etaY 		lnSupplierImports $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m1 
	logit injDecision etaY 		upstream $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m2 
	logit injDecision etaT 		lnSupplierImports $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m3 
	logit injDecision etaT 		upstream $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m4 
	logit injDecision etaM 		lnSupplierImports $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m5 
	logit injDecision etaM 		upstream $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM lnSupplierImports upstream) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels lnSupplierImports "Supplier Imports (log)" upstream "Upstreamness")	


	* Table G11 | Vertical Integration
	logit injDecision etaY 		vertIntegrated $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m1 
	logit injDecision etaY 		targetSubs $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m2 
	logit injDecision etaT 		vertIntegrated $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m3 
	logit injDecision etaT 		targetSubs $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m4 
	logit injDecision etaM 		vertIntegrated $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m5 
	logit injDecision etaM 		targetSubs $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM vertIntegrated targetSubs) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels ///
		vertIntegrated "Vertical Integration" /// 
		targetSubs "Subsidiaries in Target Market")


	* Table G12 | Employment  
	logit injDecision etaY 		lnEmployees $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m1 
	logit injDecision etaY 		lnEmployeesInd $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m2 
	logit injDecision etaT 		lnEmployees $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m3 
	logit injDecision etaT 		lnEmployeesInd $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m4 
	logit injDecision etaM 		lnEmployees $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m5 
	logit injDecision etaM 		lnEmployeesInd $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM lnEmployees lnEmployeesInd) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels ///
		lnEmployees "log Employees (firm)" /// 
		lnEmployeesInd "log Employees (industry)")


	* Table G13 | Industry-level controls 
	logit injDecision etaY 		shareGDPg $controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m1 
	logit injDecision etaY 		valueAdded capRatioB $controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m2 
	logit injDecision etaT 		shareGDPg $controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m3 
	logit injDecision etaT 		valueAdded capRatioB $controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m4 
	logit injDecision etaM 		shareGDPg $controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m5 
	logit injDecision etaM 		valueAdded capRatioB $controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM ) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels ///
		shareGDPg "GDP Growth added" /// 
		valueAdded "Value Added (\%GDP)" capRatioB "Capital-Labor Ratio" )


	* Table G14 | Political controls  
	logit injDecision etaY 		lnC $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m1 
	logit injDecision etaY 		demShare $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m2 
	logit injDecision etaT 		lnC $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m3 
	logit injDecision etaT 		demShare $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m4 
	logit injDecision etaM 		lnC $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m5 
	logit injDecision etaM 		demShare $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM lnCounties demShare) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels /// 
		lnCounties "Counties $>250$ employees" demShare "Democratic Representation" )


	* Table G15 | Swing States 
	logit injDecision etaY  lnEmpSwing  $controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m1 
	logit injDecision etaY  swingState 	$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m2 
	logit injDecision etaT 	lnEmpSwing 	$controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m3 
	logit injDecision etaT  swingState 	$controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m4 
	logit injDecision etaM 	lnEmpSwing  $controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m5 
	logit injDecision etaM 	swingState 	$controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM lnEmpSwing swingState  ) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels swingState "Firm in swing state" lnEmpSwing "Industry employment in swing states (log)")


	* Table A16 | Lobbying and Campaign Donations 
	global controls3 	"MNC listed rerWeight lnFixed steelDummy lnOutput imp_perc_change nme  ye ye2 ye3 presElection" 

	logit injDecision etaY 	lobby 	      $controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m1 
	logit injDecision etaY  anyDIME anyLobby 	$controls3 i.naics_3d, robust nolog cluster(naics)
	estimates store m2 
	logit injDecision etaT 	lobby 		$controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m3 
	logit injDecision etaT  anyDIME anyLobby 	$controls3 i.naics_3d, robust nolog cluster(naics)
	estimates store m4 
	logit injDecision etaM 	lobby  	      $controls2 i.naics_3d, robust nolog cluster(naics)
	estimates store m5 
	logit injDecision etaM 	anyDIME anyLobby 	$controls3 i.naics_3d, robust nolog cluster(naics)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM DIME lobby anyDIME anyLobby ) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels //// 
		anyLobby "Any Lobbying" anyDIME "Any Campaign Contributions" /// 
		lobby "Lobbying" DIME "Campaign Contributions")


	* Table A17 | Import Volumes, Exporter FE 
	logit injDecision etaY lnImports	 	$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m1 
	logit injDecision etaY  i.ctyID 	$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m2 
	logit injDecision etaT 	lnImports 	$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m3 
	logit injDecision etaT  i.ctyID 	$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m4 
	logit injDecision etaM  lnImports 	$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m5 
	logit injDecision etaM i.ctyID	$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM lnImports) ///
	 	drop(ye ye2 ye3 *naics_* *ctyID) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels lnImports "Import volume (log)")


	* Table A18 | NMEs: FE, split sample 
	logit injDecision etaY 	 	$controls2 i.naics_3d if nme == 0, robust nolog cluster(CASE_ID)
	estimates store m1 
	logit injDecision etaY  	 $controls2 i.naics_3d if nme == 1, robust nolog cluster(CASE_ID)
	estimates store m2 
	logit injDecision etaT 	 	$controls2 i.naics_3d if nme == 0, robust nolog cluster(CASE_ID)
	estimates store m3 
	logit injDecision etaT   	$controls2 i.naics_3d if nme == 1, robust nolog cluster(CASE_ID)
	estimates store m4 
	logit injDecision etaM    	$controls2 i.naics_3d if nme == 0, robust nolog cluster(CASE_ID)
	estimates store m5 
	logit injDecision etaM 		$controls2 i.naics_3d if nme == 1, robust nolog cluster(CASE_ID)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels)


      * Table A19 | Briefs by Members of Congress 
      nbreg totalSig etaY 		$controls, robust nolog cluster(CASE_ID)
	estimates store m1 
	nbreg totalSig etaY 		$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m2 
	nbreg totalSig etaT 		$controls, robust nolog cluster(CASE_ID)
	estimates store m3 
	nbreg totalSig etaT 		$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m4 
	nbreg totalSig etaM 		$controls, robust nolog cluster(CASE_ID)
	estimates store m5 
	nbreg totalSig etaM 		$controls2 i.naics_3d, robust nolog cluster(CASE_ID)
	estimates store m6 

	estout m1 m2 m3 m4 m5 m6, extracols(3 5) nolz style(tex) /// 
		order(etaY etaT etaM) ///
	 	drop(ye ye2 ye3 *naics_* ) ///
	 	cells(b(nostar fmt(a2)) p(par fmt(%4.3f))) ///
	 	stats(N, fmt(%9.0fc) labels("Number Obs." ))  ///
	 	varlabels($varlabels)
 


